package com.pan.hisystem.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author qingyang
 * @since 2022-03-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("h_registration")
@ApiModel(value="Registration对象", description="")
public class Registration implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "挂号id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "卡号")
    private String mid;

    @ApiModelProperty(value = "患者id")
    private Integer pid;

    @ApiModelProperty(value = "医生id")
    private Integer uid;

    @ApiModelProperty(value = "支付方式")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty(value = "是否缴费")
    @TableField("pay_status")
    private Boolean payStatus;

    @ApiModelProperty(value = "实收金额")
    private Double revPrice;

    @ApiModelProperty(value = "找回金额")
    private Double backPrice;

    @ApiModelProperty(value = "是否退号")
    @TableField("back_status")
    private Boolean backStatus;

    @ApiModelProperty(value = "挂号时间")
    @TableField("registered_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private LocalDateTime registeredTime;

    @ApiModelProperty(value = "挂号员id")
    private Integer registerId;

    @ApiModelProperty(value = "是否就诊")
    private Boolean enabled;


    @ApiModelProperty(value = "患者就诊卡信息")
    @TableField(exist = false)
    private MedicalCard medicalCard;

    @ApiModelProperty(value = "医生")
    @TableField(exist = false)
    private User user;


}
